//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package objects;

import java.util.LinkedHashMap;

public class Peoples {
    private static LinkedHashMap<Integer, PeoplesEntry> peopleById = new LinkedHashMap();
    private static LinkedHashMap<String, PeoplesEntry> peopleByName = new LinkedHashMap();

    public Peoples() {
    }

    public static void add(PeoplesEntry pe) {
        if(pe.getName() != null) {
            pe.setInstance(peopleById.size());
            peopleById.put(Integer.valueOf(pe.getGlobalID()), pe);
            peopleByName.put(pe.getName(), pe);
        }

    }

    public static PeoplesEntry getById(Integer id) {
        return (PeoplesEntry)peopleById.get(id);
    }

    public static PeoplesEntry getByName(String name) {
        return (PeoplesEntry)peopleByName.get(name);
    }
}
